package class

import (
	"fmt"

	"gitee.com/knowgo/gpa-examples/db/repos"
	"gitee.com/knowgo/gpa/rt"
)

func AddClass(p *rt.Provider, args []string) {
	repo := repos.GetRepository(p)
	class, err := repo.Class().InsertClass("24级", "2021")
	if err != nil {
		panic(err)
	}
	fmt.Println("class id:", class.ID)
}
